package com.djl.repository;

import com.djl.entity.Student;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Component
public class StudentS {

    @Resource
    StudentRepository studentRepository;

    @Transactional
    public void test(){
        Student student = new Student();
        student.setSName("dddd");
        student.setSAge(25);
        student.setId("7777");
        int insert = studentRepository.insert(student);

    }
}
